/*
 * Created on 31.08.2008
 *
 */
package com.appspot.yttv.client;

public class Video {

	private final String id;
	private final String title;
	private final String channel;
	
	Video(String id, String title, String channel) {
		this.id = id;
		this.title = title;
		this.channel = channel;
	}
	
	public String getId() {
		return id;
	}
	public String getThumbnail() {
		return "http://i1.ytimg.com/vi/" + getId() + "/default.jpg";
	}
	public String getTitle() {
		return title;
	}
	public String getChannel() {
		return channel;
	}
	
	@Override
	public int hashCode() {
		return id.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Video other = (Video) obj;
		return id.equals(other.id);
	}	
}
